DevExpress控件组件能开发出专业界面,但组件属性繁多,入门不易。本例程提供了复杂表格控件bandGridView,状态条,工具栏barmanage、容器panelControl,groupControl的应用,并提供了自定义控件的开发过程。仅供参考。
void InitTaskInfo()
{
CTaskInfo cTaskInfo = new CTaskInfo();
cTaskInfo.TaskNumber = 1;
cTaskInfo.TaskTime = DateTime.Now;
cTaskInfo.BundleNumber = 2;
cTaskInfo.SX = 123.45f;
cTaskInfo.SY = 235.89f;
cTaskInfo.SZ = 4.5f;
cTaskInfo.SP = 56.98f;
cTaskInfo.EX = 346.55f;
cTaskInfo.EY = 29.78f;
cTaskInfo.EZ = 45.98f;
cTaskInfo.EP = 678.48f;
// cTaskInfo.TaskTitle = "任务状态";
cTaskInfo.TaskStatus = "正在执行";
// cTaskInfo.ConnentTitle = "连接状态";
cTaskInfo.ConnectStatus = "已经连接";
TaskNumber.Caption = cTaskInfo.TaskNumber.ToString();
TaskTime.Caption = DateTime.Now.ToShortTimeString();
BundleNumber.Caption = cTaskInfo.BundleNumber.ToString();
SX.Caption = cTaskInfo.SX.ToString();
SX.AppearanceHeader.BackColor = Color.Lime;
SY.Caption = cTaskInfo.SY.ToString();
SY.AppearanceHeader.BackColor = Color.Lime;
SZ.Caption = cTaskInfo.SZ.ToString();
SZ.AppearanceHeader.BackColor = Color.Lime;
SP.Caption = cTaskInfo.SP.ToString();
SP.AppearanceHeader.BackColor = Color.Lime;
EX.Caption = cTaskInfo.EX.ToString();
EX.AppearanceHeader.BackColor = Color.Lime;
EY.Caption = cTaskInfo.EY.ToString();
EY.AppearanceHeader.BackColor = Color.Lime;
EZ.Caption = cTaskInfo.EZ.ToString();
EZ.AppearanceHeader.BackColor = Color.Lime;
EP.Caption = cTaskInfo.EP.ToString();
EP.AppearanceHeader.BackColor = Color.Lime;
TaskStatus.Caption = cTaskInfo.TaskStatus;
TaskStatus.AppearanceHeader.BackColor = Color.Lime;
ConnectStatus.Caption = cTaskInfo.ConnectStatus;
ConnectStatus.AppearanceHeader.BackColor = Color.Lime;
DateTimeBand.Caption = DateTime.Now.ToString("HH") ":" DateTime.Now.ToString("mm") ":" DateTime.Now.ToString("ss") " " DateTime.Now.ToString("dddd") Environment.NewLine DateTime.Now.ToString("yyyy年MM月dd日");
advBandedGridView1.PaintStyleName = "Web";
}
评论